//
//  DisShopTableViewCell.m
//  陶瓷
//
//  Created by 郭天龙 on 15/8/1.
//  Copyright (c) 2015年 王戈. All rights reserved.
//

#import "DisShopTableViewCell.h"
#import "TCBaseTool.h"
#import "UIImageView+WebCache.h"

@interface DisShopTableViewCell ()

@property (nonatomic, weak) IBOutlet UILabel *address;
@property (nonatomic, weak) IBOutlet UILabel *day;
@property (nonatomic, weak) IBOutlet UILabel *unit;
@property (nonatomic, weak) IBOutlet UILabel *time;
@property (nonatomic, weak) IBOutlet UILabel *follow;
@property (nonatomic, weak) IBOutlet UIImageView *imageview;

@end

@implementation DisShopTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(NSDictionary *)dic
{
    self.address.text = [dic objectForKey:@"Title"];
    self.day.text = [dic objectForKey:@"Price"];
    self.unit.text = @"元/㎡/天";
    NSString *times = [TCBaseTool calculateTime:[dic objectForKey:@"CreateTime"]];
    self.time.text = [NSString stringWithFormat:@"发布时间 %@",times];
    self.follow.text = [NSString stringWithFormat:@"已有%@人浏览",[dic objectForKey:@"CollectTimes"]];
    [self.imageview sd_setImageWithURL:[NSURL URLWithString:[dic objectForKey:@"ImageUrl"]] placeholderImage:nil];
}

@end
